﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="RSSFeeds.ascx.cs" Inherits="controls_admin_RSSFeeds" %>
<script type="text/javascript">
    var index = "";
    function getCheck() {
        $("table input[type=checkbox].item").each(function () {
            var checked = $(this).attr("checked");
            if (checked) {
                index = index + $(this).attr("value") + ";";
            }
        });
        $("#<%=hdfCheck.ClientID%>").val(index);
    }
    $(document).ready(function () {
        $("input.del").click(function () {
            getCheck();
            if (index == "") return false;
            else return confirm("Xác nhận xóa !");
        });
    });
</script>
<asp:HiddenField ID="hdfCheck" runat="server" />
<div class="box">
    <!-- box / title -->
    <div class="title">
        <h5 id="txtTitle" runat="server">
            Thông tin RSS</h5>
    </div>
    <div id="divMessage" runat="server">
    </div>
    <div class="first-action">
        <div class="button">
            <a href="default.aspx?control=RSSFeedsAdd">
                <input type="button" value="Thêm Mới" /></a>
            <br />
        </div>
    </div>
    <!-- end box / title -->
    <div class="table">
        <table>
            <thead>
                <tr>
                    <th class="stt">
                        STT
                    </th>
                    <th>
                        Tiêu đề
                    </th>
                    <th>
                        Danh mục
                    </th>
                    <th>
                        URL
                    </th>
                    <th>
                        Ngày tạo
                    </th>
                    <th class="smaller">
                        Thứ tự
                    </th>
                    <th class="edit">
                        Sửa
                    </th>
                    <th class="selected last">
                        <input type="checkbox" class="checkall" />
                    </th>
                </tr>
            </thead>
            <tbody>
                <asp:Repeater ID="rptData" runat="server">
                    <ItemTemplate>
                        <tr>
                            <td class="right">
                                <%#Container.ItemIndex+1%>
                            </td>
                            <td align="center">
                                <%# Eval("FEED_TITLE")%>
                            </td>
                            <td align="center">
                                <%# Eval("FULL_CATEGORY_NAME")%>
                            </td>
                            <td align="center">
                                <a href='<%#Eval("FEED_LINK")%>'>
                                    <%#Eval("FEED_LINK")%>
                                </a>
                            </td>
                            <td align="center">
                                <%#Eval("CREATED_DATE","{0:dd/MM/yyyy}")%>
                            </td>
                            <td class="right">
                                <%# Eval("ORDER_DISPLAY")%>
                            </td>
                            <td align="center">
                                <a href="default.aspx?control=RSSFeedsEdit&id=<%#Eval("RSS_FEED_ID") %>" class="edit"
                                    title="Chỉnh sửa">&nbsp;&nbsp;&nbsp;</a>
                            </td>
                            <td align="center" class="last">
                                <input id="chkBox" type="checkbox" value='<%#Eval("RSS_FEED_ID")%>' class="item"
                                    runat="server" />
                            </td>
                        </tr>
                    </ItemTemplate>
                </asp:Repeater>
            </tbody>
        </table>
        <div class="action">
            <asp:DropDownList ID="ddlAction" runat="server" OnSelectedIndexChanged="ddlAction_SelectedIndexChanged"
                AutoPostBack="true" CssClass="selectwidth">
                <asp:ListItem Value="0" class="folder-open" Text="---Chọn hành động---"></asp:ListItem>
                <asp:ListItem Value="1" class="locked" Text="Di chuyển tới thùng rác"></asp:ListItem>
                <asp:ListItem Value="2" class="unlocked" Text="Xóa vĩnh viễn"></asp:ListItem>
            </asp:DropDownList>
            <div class="button">
                <a href="default.aspx?control=RSSFeedsAdd">
                    <input type="button" value="Thêm Mới" /></a>
            </div>
        </div>
    </div>
</div>
<!-- end table -->
